package com.hoopeu.ui.activity;

import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.Window;
import android.widget.ListView;
import android.widget.TextView;

import com.hoopeu.db.ShowHandle;
import com.hoopeu.smarthome.R;
import com.hoopeu.ui.adapter.MaskAdapter;
import com.hoopeu.utils.Constants1;



public class MaskActivity extends Activity
  implements View.OnTouchListener
{
  MaskActivity context;
  ArrayList<String[]> data;
  String deviceId;
  ShowHandle showHandle;

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.mask);
    this.context = this;
    this.showHandle = new ShowHandle(this, Constants1.DB_NAME);
    this.deviceId = getIntent().getStringExtra("deviceId");
    this.showHandle.OpenDb();
    this.data = this.showHandle.getDeviceKey(this.deviceId);
    this.showHandle.CloseDb();
    ((TextView)findViewById(R.id.title)).setText(getResources().getString(R.string.mubu));
    ((TextView)findViewById(R.id.tvHomeName)).setText(getIntent().getStringExtra("roomName"));
    findViewById(R.id.btnBack).setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View paramAnonymousView)
      {
      
        MaskActivity.this.finish();
      }
    });
    ListView localListView = (ListView)findViewById(R.id.list_view);
    localListView.setDividerHeight(0);
    localListView.setAdapter(new MaskAdapter(this));
   
   
  }

  public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
  {
    return false;
  }
}